package asteroids.expressions;

import java.util.Map;

import asteroids.Ship;
import asteroids.types.*;

public class SelfExpression extends BasicExpression {

	public SelfExpression(int line, int column) {
		super(line, column);
	}

	@Override
	public Type evaluate(Ship ship, Map<String, Type> globals) {
		if(ship != null)
			return new EntityType(ship);
		else
			return new EntityType();
	}
	
	@Override
	public String toString() {
		return "self";
	}

}
